
<a id="newProject" href="<?php echo $this->url(array('controller'=>'listproject','action'=>'addproject')); ?>"><img src="<?php echo $this->BaseUrl()?>/img/newTask.png"/></a> &nbsp;

<?php
// only display the table if there is at least one project to display
if (count($this->Projects)>0) { ?> 
<table id="listProjectTable">

<tr id="tableHeader">
<!--<th>Selection</th>-->
    <th>Name</th>
    <th>Company</th>
    <th>Start Date</th>
    <th>End Date</th>
    <th>Website</th>
    <th>&nbsp;</th>
</tr>

<?php foreach($this->Projects as $Project) : ?>

<tr id="tableContent">
    <!--<td>
   		<form action="<?php echo $this->url(array('controller'=>'listproject','action'=>'deleteproject')); ?>" method="post"> 
    		<input type="checkbox"  name="cgu" value="<?php echo $Project->idProject ?>" />
    	</form>
    </td>-->
    <td><a href="<?php echo $this->url(array('controller'=>'planning', 
        'action'=>'showdiagramm', 'project'=>$Project->name));?>"> <?php echo $this->escape($Project->name);?></a></td>
    <td><?php echo ( $this->escape( $Project->enterprise));?></td>
    <td><?php
	    echo Perso_DateUtils::formatSQLDate('d-m-Y', $Project->startDate);
    	?>
	</td>
    <td><?php
	    echo Perso_DateUtils::formatSQLDate('d-m-Y', $Project->endDate);
    	?>
    </td>
    <td><?php echo $this->escape($Project->website);?></td>
    <td>
        <a id="deleteProject" href="<?php echo $this->url(array('controller'=>'listproject', 
       	'action'=>'deleteproject', 'idProject'=>$Project->idProject));?>"><img src="<?php echo $this->BaseUrl()?>/img/deleteProject.png"/></a>
    </td>
  
</tr>

<?php endforeach; ?>
<?php } else {
	echo "<br/>You don't have created a project yet.";
}?>

</table>
